/**
 * @author mili
 */

/**
 * This js file is used to parse roads object
 * Methods below for accessing road attributes
 * */

function getNumOfRoads(roads){
	return roads.length;
}

function getRoad_index(roads, index){
	return roads[index];
}

function getCrossStreet(road){
	return road.crossStreet;
}

function getImpactedLanes(road){
	return road.impactedLanes;
}

function getLocationQualifier(road){
	return road.locationQualifier;
}

function getMainStreet(road){
	return road.mainStreet;
}

function getQueueLength(road){
	return road.queueLength;
}

function getQuadrant(road){
	return road.quadrant;
}

function getRegion(road){
	return road.region;
}

function getSecondLocation(road){
	return road.secondLocation;
}

function getSuburb(road){
	return road.suburb;
}

function getTrafficVolume(road){
	return road.trafficVolume;
}

function getUbdRef(road){
	return road.ubdRef;
}

/**
 * Methods below for accessing impacted lanes
 * */
function getNumOfImpactedLanes(impactedLanes){
	return impactedLanes.length;
}

function getImpactedLane_index(impactedLanes, index){
	return impactedLanes[index];
}

function getImpactedLaneExtent(impactedLane){
	return impactedLane.extent;
}

/**
 * This method return all the info of given array of roads
 * */
function getRoadInfo(roads){
	return "Main Street: "+roads[0].mainStreet+"<br>"+"Cross Street: "+roads[0].crossStreet+"<br>";
}
